package com.bw.db.room
import androidx.room.Database
import androidx.room.RoomDatabase
import com.bw.db.room.dao.UserInfoDao
import com.bw.db.room.entity.UserInfoEntity
/**
 * 自定义Room数据库
 */
@Database(
    entities = [UserInfoEntity::class], //代表几个实体
    version = 2, //数据库版本号
    exportSchema = true,// 是否导出数据库结构，数据库升级时必须设置为true
    autoMigrations = [
 //       AutoMigration(from = 1, to = 2, spec = UserInfoTableNameMigration::class),//数据库升级策略
   //     AutoMigration(from = 1, to = 2, spec = UserInfoColumnNameMigration::class),
                     ],//数据库升级策略

)
abstract class AppDataBase:RoomDatabase() {
    //定义获取操作Dao抽象方法
    abstract fun getUserInfoDao(): UserInfoDao
}